class Arena_Game extends UDKGame dependson(NIUI_Core);;

var NIUI_Core niui;
var int imageMapHandle;
var int depthMapHandle;
var int colorMapHandle;

event PostBeginPlay()
{
	local Vector pos;

	// Create the core.
	niui = Spawn(class'NIUI_Core',,, pos);
	niui.Initilise();

	niui.SetDefaultUserColorMapPallete();
	niui.OpenPreviewWindow(640, 480);

	//niui.AddCameraInput(NIUI_CAMERA_FEED_ImageMap, imageMapHandle);
	//niui.SetCameraInputPosition(imageMapHandle, -150, 0);
	//niui.SetCameraInputScale(imageMapHandle, 1.0, 1.0);

	niui.AddCameraInput(NIUI_CAMERA_FEED_DepthMap, depthMapHandle);
	niui.SetCameraInputPosition(depthMapHandle, 0, 0);
	niui.SetCameraInputScale(depthMapHandle, 1.0f, 1.0f);

	niui.AddCameraInput(NIUI_CAMERA_FEED_UserColorMap, colorMapHandle);
	niui.SetCameraInputPosition(colorMapHandle, 0, 100);
	niui.SetCameraInputScale(colorMapHandle, 1.0f, 1.0f);

	niui.SetUserColor(1, 255, 0, 0);
	
	super.PostBeginPlay();
}

event Tick(float DeltaTime)
{
	super.Tick(DeltaTime);

	// Update the NIUI core.
	if (niui.ShouldNotifyDepencies())
	{
		niui.NotifyDependenciesOfCreation();
	}
	niui.UpdateNIUICore(DeltaTime);
}
DefaultProperties
{
    bDelayedStart=false
    DefaultPawnClass = class'Arena.Arena_PlayerPawn' //Base GameInfo class doesn't have a pawn, and we need one to collide with the coins
	PlayerControllerClass = class'Arena.Arena_PlayerController'
}
